﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zero.Code;
using Zero.Model;
using Zero.DAL;

namespace Zero.BLL
{
    /// <summary>
    /// 角色授权逻辑层
    /// 作者：edl
    /// 最后修改日期：2019-9-22
    /// </summary>
    public class RoleAuthorization
    {
        /// <summary>
        /// 功能模块集合
        /// </summary>
        /// <param name="RoleId">角色ID</param>
        /// <returns></returns>
        public List<modular> GetModularsList(string RoleId)
        {
            return new DAL.RoleAuthorization().GetModularsList(RoleId);
        }


        /// <summary>
        /// 获取岗位
        /// </summary>
        /// <param name="OrganizedID">机构ID</param>
        /// <returns></returns>
        public List<role> GetDuty(int OrganizedID)
        {
            return new DAL.RoleAuthorization().GetDuty(OrganizedID);
        }

        /// <summary>
        /// 通过角色表中的唯一主键获取岗位
        /// </summary>
        /// <param name="R_ID"></param>
        /// <returns></returns>
        public role GeyDutyById(int R_ID)
        {
            return new DAL.RoleAuthorization().GeyDutyById(R_ID);
        }

        /// <summary>
        /// 通过角色ID获取岗位
        /// </summary>
        /// <param name="roleID"></param>
        /// <returns></returns>
        public List<role> GetDutyByRoleID(int RoleID)
        {
            return new DAL.RoleAuthorization().GetDutyByRoleID(RoleID);
        }
    }
}
